home *** CD-ROM | disk | FTP | other *** search
- /*
- * The contents of this file are subject to the Netscape Public
- * License Version 1.1 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.mozilla.org/NPL/
- *
- * Software distributed under the License is distributed on an "AS
- * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
- * implied. See the License for the specific language governing
- * rights and limitations under the License.
- *
- * The Original Code is Mozilla Communicator client code, released
- * March 31, 1998.
- *
- * The Initial Developer of the Original Code is Netscape
- * Communications Corporation. Portions created by Netscape are
- * Copyright (C) 1998-1999 Netscape Communications Corporation. All
- * Rights Reserved.
- *
- * Contributor(s):
- * Ben Goodger (03/11/99)
- */
-
- //var bundle = srGetStrBundle("chrome://communicator/locale/profile/newProfile1_2.properties");
- //var detect = false;
-
- // the getting procedure is unique to each page, since each page can different
- // types of elements (not necessarily form elements). So each page must provide
- // its own GetFields function
- function GetFields()
- {
- var emailaddr = "dummy"
- var rv = {
- emailaddr: { id: "emailaddr", value: emailaddr },
-
- }
- return rv;
- }
-
- // the setting procedure is unique to each page, and as such each page
- // must provide its own SetFields function
- function SetFields(element,set)
- {
- //element = document.getElementById(element);
- //dump("In SetFields(" + element + "," + set + ");\n");
- //if(element.id == "emailaddr")
- // element.value = set;
- }
-
- // function createProfileWizard.js::chooseFolder();
- // utility function responsible for displaying a folder selection dialog.
- function chooseFolder(string)
- {
- try {
- var fileSpec = Components.classes["@mozilla.org/filespecwithui;1"].createInstance();
- if(fileSpec) {
- fileSpec = fileSpec.QueryInterface(Components.interfaces.nsIFileSpecWithUI);
- return fileSpec.chooseDirectory(string);
- } else
- return false;
- } catch(e) {
- return false;
- }
- }
-
- // tree picker
- function picker(e){
- targetValue=e.target.getAttribute("value");
-
- addBuddyButton = document.getElementById("btnaddbuddy");
- imButton = document.getElementById("btnim");
-
-
-
- if((targetValue!="Screen name")&&(e.target.tagName=="treecell")){
-
- addBuddyButton.setAttribute("onclick","openDialog('chrome://aim/content/BuddyAddBuddy.xul','','modal=yes,titlebar,chrome', null, null,'"+targetValue+"');")
-
- imButton.setAttribute("onclick","aimIMInvokeIMForm('"+targetValue+"', null)");
- clearTreeCellClass();
- e.target.setAttribute("class","fafselected")
- }
-
- //dump('e.target'+e.target.nodeName+"\n");
- dump('reset addbuddy and imbutton \n');
-
- }
-
- function clearTreeCellClass(){
- treeCells=document.getElementsByTagName("treecell")
- for(k=0;k<treeCells.length;k++){
- if(treeCells.item(k).getAttribute("issearchresult") == "true"){
- treeCells.item(k).setAttribute("class","")
- }
- }
- }
-
-
- // show results
-
-
- function showRes(){
-
- //dump('showres:containerarray.length' +parent.containerArray.length +"\n");
- //dump('showres:parent.containernode.childnodes.length:' +parent.containerNode.childNodes.length+"\n");
-
-
-
- document.getElementById("usersnum").setAttribute("value",parent.numHits);
- //ff1_2numHits.appendChild(parent.numHits);
-
-
- document.getElementById("emailaddress").setAttribute("value", parent.queryEmailAddress);
- //ff1_2queryEmailAddress.appendChild(parent.queryEmailAddress);
-
- var searchResults = document.getElementById('theresults');
-
- var searchResultsArray = parent.containerArray;
- var searchRowArray = new Array();
- var searchCellArray = new Array();
-
-
-
- for(k=0;k<searchResultsArray.length;k++){
- searchRowArray[k] = document.createElement("treerow");
- searchCellArray[k] = document.createElement("treecell");
- searchCellArray[k].setAttribute("value",searchResultsArray[k]);
- searchCellArray[k].setAttribute("issearchresult","true");
- searchRowArray[k].appendChild(searchCellArray[k]);
- searchResults.appendChild(searchRowArray[k]);
-
- }
-
- searchResultsArray.length=0;
-
- }
-
-